from django.urls import re_path
from rest_framework_jwt.views import obtain_jwt_token
from rest_framework.routers import DefaultRouter
from users.views import register, userinfo

urlpatterns = [
    re_path(r'^authorizations/$', obtain_jwt_token),
    re_path(r'^sms_codes/(?P<mobile>1[3-9]\d{9})/$', register.SMS_Veri_Code.as_view()),
    re_path(r'^user/password/$', userinfo.ModifyPasswordView.as_view()),
    re_path(r'^user/$', userinfo.PersonMyfileView.as_view()),
    re_path(r'^users/like/(?P<pk>\d+)/$', userinfo.UserfollowModelView.as_view()),
]

router = DefaultRouter()
# router.register(r'users/like', userinfo.UserfollowModelView, basename='like')
#
# urlpatterns += router.urls

router.register(r'users', register.UserRegisterModelViewSet, basename='usersregister')

urlpatterns += router.urls
